Skip to content

Conversation

@kjy5
Copy link
Member

@kjy5 kjy5 commented Apr 17, 2025

Brief summary of changes

Notes

@kjy5 kjy5 requested a review from Copilot April 17, 2025 07:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the initialization and device handling logic of the UMP binding by removing error raises in the constructor and shifting error handling to the asynchronous accessor methods. Key changes include:

  • Removing error checks and exceptions from init
  • Refactoring get_manipulators to return an empty list for no devices
  • Adjusting get_axes_count to handle the empty list case and calling get_axes_count in _is_ump_3

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/ephys_link/bindings/ump_binding.py Refactored device error handling and axis count logic
src/ephys_link/about.py Version bump reflecting the new build version

@kjy5 kjy5 requested a review from Copilot April 17, 2025 07:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/ephys_link/bindings/ump_binding.py:56

  • Validating device axis consistency in get_manipulators() rather than during initialization may delay the detection of incompatible device configurations. Ensure that consumers of get_manipulators() can correctly handle the delayed error scenario.
if any(self._get_device(device_id).n_axes() != self.axis_count for device_id in device_ids):  # pyright: ignore [reportUnknownArgumentType, reportUnknownMemberType]

@kjy5 kjy5 enabled auto-merge (squash) April 17, 2025 07:54
@kjy5 kjy5 merged commit 713be61 into main Apr 17, 2025
5 checks passed
@kjy5 kjy5 deleted the no-error-in-init branch April 17, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants